package com.suqiu.qqrobot.enums;

import lombok.Getter;

/**
 * @author suqiu
 * 命令
 * @date 2022/3/18
 */
@Getter
public enum CommandTypeEnum {

    CHOOSE_AI("CHOOSE_AI", "选择AI"),
    CLEAR_CONTEXT("CLEAR_CONTEXT", "清空上下文");

    final private String tagName;
    final private String value;

    CommandTypeEnum(final String tagName, final String value) {
        this.tagName = tagName;
        this.value = value;
    }

    public static CommandTypeEnum of(String value) {
        for (CommandTypeEnum globalStatus : CommandTypeEnum.values()) {
            if (globalStatus.getValue().equals(value)) {
                return globalStatus;
            }
        }
        return null;
    }

}
